
#include <stdio.h> 

#include "zlog.h"

int main(int argc, char** argv)
{
    int rc;
    zlog_category_t *c;

    rc = zlog_init("zlog.conf");
    if (rc) {
        printf("init failed\n");
        return -1;
    }

    c = zlog_get_category("my_cat");
    if (!c) {
        printf("get cat fail\n");
        zlog_fini();
        return -2;
    }
     long begin = time(0);
     
    for(int i = 0; i < 10000; i++)
    {
    zlog_info(c, "info");
    zlog_error(c, "error");
    }
    long end = time(0);
    printf("%d\n", end-begin);
    zlog_fini();
    

    return 0;
}